<link href="__STATIC__/css/comment.css" rel="stylesheet">
<script src="__STATIC__/js/article/comment.js"></script>
<script>
    var isloginurl="<{:url("/islogin")}>";
    var comment_reply_url="<{:url('/reply_comment')}>";
</script>
<div  class="comment_div">
    <div class="comment_title">
        <span>最新评论</span>
    </div>
    <div class="comment_content">
        <input type="hidden" id="url" value="<{:url('/useraddcomment')}>">
        <div class="comment_i">
            {if condition="$bloguser neq ''"}
                    <img  src="<{$bloguser['user_img']}>">

                {else/}
                    <img  src="__STATIC__/img/tou.gif">
            {/if}
            <textarea id="content" placeholder="来评论点什么吧"></textarea>
            {if condition="$bloguser neq ''"}
                    <a class="comment_pl" onclick="comment_pl()">评论</a>
                {else/}
                    <span class="comment_login" onclick="login()">登录</span>
            {/if}
        </div>
        <div class="comment_text">
            <input type="hidden" id="comment_id">
            {foreach name="commentData" item="data"}-
                <div class="comment_a">
                    <div class="comment_img">
                        <img style="height: 45px;width: 45px;" src="<{$data['user_img']}>">
                    </div>
                    <div class="comment_t">
                        <p class="comment_p_text"><span class="reply_span"><{$data['user_name']}></span>：<{$data['content']}></p>
                        <p class="comment_p_time"><{$data['add_time']}>&nbsp;<a data-id="<{$data['id']}>" onclick="reply(this)">回复</a></p>
                    </div>
                    {if condition="array_key_exists('data',$data)"}
                        {foreach name="$data['data']" item="item"}
                            <div class="reply_comment">
                                <span class="reply_span_1"><{$item["user_name"]}></span>回复：
                                <span class="reply_span_2"><{$item["reply_name"]}></span>
                                <span><{$item["content"]}></span>
                                <p class="reply_time" ><{$item['add_time']}>&nbsp;<a data-id="<{$data['id']}>" onclick="reply(this)">回复</a></p>
                            </div>
                        {/foreach}
                    {/if}
                </div>
            {/foreach}
            <div style="height: 100px;width: 100%;display: inline-block"></div>
        </div>
    </div>

</div>